[java] how to parse XML document?

Posted by user32167 on Stack Overflow See other posts from Stack Overflow or by user32167
Published on 2010-06-16T00:38:48Z Indexed on 2010/06/16 0:42 UTC
Read the original article Hit count: 211

Filed under:
|

I have xml document in variable (not in file). How can i get data storaged in that? I don't have any additional file with that, i have it 'inside' my sourcecode. When i use

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(XML);

(XML is my xml variable), i get an error

java.io.FileNotFoundException: C:\netbeans\app-s7013\<network ip_addr="10.0.0.0\8" save_ip="true"> File not found.

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml